import request from '../utils/request';
import { AxiosRequestConfig } from 'axios'
export const GetMatchList =(urlParams: any): Promise<unknown> => {
    return request({
        url:'/fm/api/match/list',
        method: 'get',
        params:urlParams,
    });
};
export const GetMatchTeamList =(matchCode: string): Promise<unknown> => {
    return request({
        url:`/fm/api/match/team/list?matchCode=${matchCode}`,
        method: 'get',
    });
};
export const GetMatchTeamUnList =(matchCode: string): Promise<unknown> => {
    return request({
        url:`/fm/api/match/team/unlist?matchCode=${matchCode}`,
        method: 'get',
    });
};
export const AddMatch =(urlParams: any): Promise<unknown>  => {
    return request({
        url: '/fm/api/match/add ',
        method: 'post',
        data:urlParams
    });
};
export const EditMatch =(urlParams: any,matchCode:string): Promise<unknown>  => {
    return request({
        url: `/fm/api/match/edit/${matchCode}`,
        method: 'post',
        data:urlParams
    });
};
export const EditMatchTeam =(urlParams: any,matchCode:string): Promise<unknown>  => {
    return request({
        url: `/fm/api/match/team/${matchCode}`,
        method: 'post',
        data:urlParams
    });
};
export const DeleMatch = (matchCode: string): Promise<unknown>  => {
    return request({
        url: `/fm/api/match/delete/${matchCode}`,
        method: 'delete'
    });
};
